<template>
  <div class="slider-card bgWhite">
    <CardTitle>
      <template slot="title">标签</template>
    </CardTitle>
    <div class="cardContent">
      <template>
        <label class="labSort" v-rainbowa v-for="(item, index) in list" :key="index">{{item.typename}}({{item.typenum}})</label>
        <a-skeleton :loading="loading" active :paragraph="{ rows: 1 }"></a-skeleton>
      </template>
    </div>
  </div>
</template>
<script lang="ts">
import config from "../utils/config";
import { Component, Prop, Vue, Emit } from "vue-property-decorator";
@Component
export default class HelloWorld extends Vue {
  list: Array<any> = []
   loading: boolean = true;
  created() {
    this.loadList();
  }
  async loadList() {
    const res = await this.$axios.$get(config.BASE_URL + "/api/ctype/list");
    this.loading = false;
    this.list = res.d;
  }
}
</script>

<style lang="scss" scoped>
/* 分类开始 */

label.labSort {
  /* background: rebeccapurple; */
  padding: 6px 8px;
  display: inline-block;
  margin: 5px;
  border-radius: 4px;
  text-align: center;
  /* color: #fff; */
  font-size: 15px;
  cursor: pointer;
  border: 1px dashed;
}

.cardContent {
  padding: 10px 0;
}

/* 分类结束 */
</style>